#作业1
name = input("你的名字；")
monday = input("周一课表:")
tuesday = input("周二课表:")
wednesday= input("周三课表:")

thursday= input("周四课表:")
friday= input("周五课表:")
saturday= input("周六课表:")
sunday= input("周天课表:")
info = '''-------INFO OF %s -------
Name:%s
monday:%s
tuesday:%s
Wednesday:%s
Thursday:%s
Friday:%s
Saturday:%s
Sunday:%s
'''% (name,name,monday,tuesday,wednesday,thursday,friday,saturday,sunday,)
#作业2
print(info)
a=input("输入星期几的课表，可打印当天的课表")
if a == "monday":
    print(monday)
elif a == "tuesday":
    print(tuesday)
elif a == "wednesday":
    print(wednesday)
elif a == "thursday":
    print(thursday)
elif a == "friday":
    print(friday)
elif a == "saturday":
    print(saturday)
elif a == "sunday":
    print(sunday)
vowels = ["a","e","i","o","u"]
word = input("Provide a word to search for vowels:")
found = []
for letter in word:
    if letter in vowels:
        if letter not in found:
            found.append(letter)#增加元素
for vowel in found:
        print(vowel)
print(found)
##### 减少元素方法
nums= [1,2,3,4]
print(nums)

nums.remove(3)#这是直接删除3
print(nums)
nums.pop()#这是可以根据顺序 删除  不写 则删除最后一个。顺序为0 ，1.。。
print(nums)
# 用对象 扩展列表
nums.extend([5,6])
print(nums)
#这个也是可以的，啥也没加
nums.extend([])
#插入第一个0 为位置  第二个为你想要插入的数字
nums.insert(0,1)
print(nums)




####作业四 课本练习
phrase= "Don't panic!"
plist = list(phrase)
print(phrase)
print(plist)
for i in range(4):
    plist.pop()
plist.pop(0)
plist.remove("'")
plist.extend([plist.pop(),plist.pop()])
plist.insert(2,plist.pop(3))
new_phrase = ''.join(plist)
print(plist)
print(new_phrase)
letter= "Don't panic"
letters=list(letter)
print(letters)
#letters[start,stop ,step]
print(letters[0:10:3])
print(letters[3:])#第三个开始切
print(letters[:10])#直到第十个不包括
print(letters[::2])#每两个开始切

#作业4  课本练习
phrase= "Don't panic!"
plist = list(phrase)
print(phrase)
print(plist)
new_phrase=''.join(plist[1:3])
new_phrase=new_phrase+''.join([plist[5],plist[4],plist[7],plist[6]])
print(plist)
print(new_phrase)